package com.woniuxy.entity;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

public class User {
    @NotEmpty(message = "名字不能为空")
    private String name;
    @Valid
    private GirlFriend girl;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public GirlFriend getGirl() {
        return girl;
    }

    public void setGirl(GirlFriend girl) {
        this.girl = girl;
    }

    public User() {
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", girl=" + girl +
                '}';
    }
}
